<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/mobile/include/taglib.jsp"%>
<html>
<head>
	<title>送货员管理</title>
	<%@include file="/WEB-INF/views/mobile/include/head.jsp" %>
	<script type="text/javascript">
		$(document).ready(function() {
			//日期控件初始化
			fun();
		});
		
		var fun = function () {
            $('.time').mobiscroll().date({
		    	theme: 'android', 
				mode: 'scroller', 
				minDate: new Date(2000, 1, 1, 00, 00),
                maxDate: new Date(2050, 12, 31, 23, 59),
				display: 'modal',
				lang: 'zh'
			});
        }
	</script>
</head>
<body data-role="page">
	<div data-role="header" class="ui-header" data-position="fixed" data-tap-toggle="false">
		<div data-role="controlgroup" data-type="horizontal" class="ui-btn-left">
			<a href="${ctx }/ivm/merchant/set"><img class="head-back-icon" src="${ctxFront}/images/head/android/back.png"/></a>
	    </div>
	    <h1>送货统计</h1>
		<div data-role="controlgroup" data-type="horizontal" class="ui-mini ui-btn-right">
	        <a href="#popup-outside-page" data-rel="popup" class="float-right"><img class="head-more-icon" src="${ctxFront}/images/head/android/more.png"/></a>
	    </div>
	</div>
	<div role="main" class="ui-content">
		<form:form id="searchForm" action="${ctx}/ivm/deliverymember/stats" method="post" class="breadcrumb form-search input-date">
			<table border="0" cellpadding="0" cellspacing="0" class="search-table">
				<tr>
			    	<td width="26%">开始日期:</td>
			    	<td width="50%"><input id="startDate" name="startDate" data-inline="true" type="text" readonly="readonly" maxlength="20" class="time required" value="${startDate }"/></td>
			    	<td width="24%" rowspan="2"><button id="btnSubmit" style="height: 80px; margin: 0px 10px 5px 10px;" class="btn" type="submit">查询</button></td>
			  	</tr>
			  	<tr>
			    	<td>结束日期:</td>
			    	<td><input id="endDate" name="endDate" data-inline="true" type="text" readonly="readonly" maxlength="20" class="time required" value="${endDate }"/></td>
			  	</tr>
			</table>
		</form:form>
		<!-- 统计 -->
		<div class="summary_div">
			<table width="100%" border="0">
				<tr align="center"><td width="30%"><strong>总计</strong></td><td width="40%"><strong>总计</strong></td><td width="30%"><strong>日人均</strong></td></tr>
				<tr align="center"><td>${allMembers }人</td><td>${allIndents }单</td><td>${avgIndents }单</td></tr>
			</table>
		</div>
		<ul data-role="listview" class="stats">
			<li class="ui-li-thumb" data-icon="false">
			    <h3>姓名</h3>
			    <p class="ui-li-aside" style="right: 150px; font-size: 14px">天数</p>
			    <p class="ui-li-aside" style="right: 85px; font-size: 14px">日均</p>
			    <p class="ui-li-aside" style="right: 20px; font-size: 14px">总计</p>
			</li>
		<c:forEach items="${page.list}" var="stats">
			<li class="ui-li-thumb"  data-icon="false">
			    <h3>${stats.memberName }</h3>
			    <p class="ui-li-aside" style="right: 155px; font-size: 14px">${stats.days }天</p>
			    <p class="ui-li-aside" style="right: 95px; font-size: 14px">${stats.average }</p>
			    <p class="ui-li-aside" style="right: 30px; font-size: 14px">${stats.totalIndents }</p>
	       	</li>
		</c:forEach>
		</ul>
		<!-- 右上角菜单 -->
		<div id="popup-outside-page" data-theme="a">
		    <ul data-role="listview">
		        <li><a href="${ctx}/ivm/deliverymember/form?type=1" class="ui-btn ui-shadow ui-icon-plus ui-btn-icon-left">新增</a></li>
		        <li><a href="${ctx}/ivm/deliverymember/list?type=1" class="ui-btn ui-shadow ui-icon-user ui-btn-icon-left">送货员</a></li>
		    </ul>
		</div>
	</div>
	<%@include file="/WEB-INF/views/mobile/layouts/menu.jsp" %>
</body>
</html>
